[XEN] Fix ptwr_do_page_fault() after new more permissive
authorkfraser@dhcp93.uk.xensource.com <kfraser@dhcp93.uk.xensource.com>
Mon, 19 Jun 2006 09:18:39 +0000 (10:18 +0100)
committerkfraser@dhcp93.uk.xensource.com <kfraser@dhcp93.uk.xensource.com>
Mon, 19 Jun 2006 09:18:39 +0000 (10:18 +0100)
commit3be130f83911170df86f5d37df523fe64d3623c6
treee7c24049f34dba38ead79cac8768d0fd3328fe53
parentf01a089de1b455adf7cd7ab6f46da5bf4624d29f
[XEN] Fix ptwr_do_page_fault() after new more permissive
entry conditions to that function. Now that we no longer
check PGERR_page_present (i.e., that fault is a protection
fault), because it's not safe to do so, we can enter
ptwr_do_page_fault() with a not-present L2 page directory.
We then crash on our first access to the linear_l2_table.
This patch fixes all unprotected accesses to the
linear_l2_table to correctly handle faults.

Also move setup of globally-visible ptwr info record to end
of ptwr_do_page_fault(). We don't want the info picked up
by reentrant invocations of the page-fault handler.

Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/mm.c